#ifndef __TTPARAM__
#define __TTPARAM__
#include <iostream>
#include <queue>
#include <stack>
#include <array>
#include <forward_list>
#include <list>
#include <deque>
#include <vector>
using namespace std;

//在 template<typename...> 中的 ... 是 C++ 中的可变模板参数语法。它表示可以接受任意数量的模板参数。
//而vector<T>本身含有两个参数 template<typename _Tp, typename _Alloc = std::allocator<_Tp> >，第一个是传入的具体元素的模板，第二个是分配器，分配器通常不写

template<typename T>
using Vctr = vector<T,allocator <T>>;

template <typename T, template<typename> class Container>
class mySuperVT
{
public:
    mySuperVT(){};
    void push(const T &args){};
    void pop(){};
    T &top() const {};
    void empty(){};
    mySuperVT &operator+(const T &args){};
    int &length() const {};

private:
    Container<T> my_vector;
};

template <typename T, template<typename> class Container>
void mySuperVT<T, Container>::push(const T& args)
{
    my_vector.push_back(args);
}

template <typename T, template<typename> class Container>
void mySuperVT<T, Container>::pop()
{
    my_vector.pop_back();
};

template <typename T, template<typename> class Container>
T &mySuperVT<T, Container>::top() const
{
    return my_vector.back();
};

template <typename T, template<typename> class Container>
void mySuperVT<T, Container>::empty()
{
    my_vector.empty();
};

template <typename T, template<typename> class Container>
mySuperVT<T, Container> &mySuperVT<T, Container>::operator+(const T &args)
{
    return push(args);
};

template <typename T, template<typename> class Container>
int &mySuperVT<T, Container>::length() const
{
    return my_vector.length();
};

#endif

int main()
{
    mySuperVT<int, Vctr> my_Vector; 
    my_Vector.push(1);
    my_Vector.push(2);
    my_Vector.push(3);
    my_Vector.push(4);
    my_Vector.push(5);
    cout << "***********" << endl;
    cout << "Size of my_Vector: " << my_Vector.length() << endl;
    my_Vector = my_Vector + 6;
    cout << "Size of my_Vector after +: " << my_Vector.length() << endl;
    my_Vector.push(7);
    cout << "Size of my_Vector after push: " << my_Vector.length() << endl;
    my_Vector.pop();
    cout << "Size of my_Vector after pop: " << my_Vector.length() << endl;
    cout << "my_Vector.top(): " << my_Vector.top() << endl;
    my_Vector.empty();
    cout << "Size of my_Vector after empty: " << my_Vector.length() << endl;
}